import { createApp } from 'vue'
import { createPinia } from 'pinia'
// elment-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import locale from 'element-plus/lib/locale/lang/zh-cn'

import App from './App.vue'
import router from './router'
import '@/permission'
import './styles/main.less'
//导入mock
import axios from './utils/request'
// 粒子插件
import Particles from 'vue3-particles'

const app = createApp(App)

app.use(createPinia())
app.use(router)
// elment-plus
app.use(ElementPlus, { locale })
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
// 粒子插件
app.use(Particles)

app.mount('#app')
app.config.globalProperties.$axios = axios
